$(function(){
	Go();
});
function Go() {
	var Y = new Yamb({
		element: $("#play-yamb"),
		language: "sr",
		games: ["down", "free", "up", "call", "hand", "updown", "middleout"]
	});
}
		
function TogglePopup(expr, func) {
	var el = $(expr);
	$(".popup").slideUp("fast");
	if(el.is(":visible")) {
		el.slideUp("fast");
	}else{
		el.slideDown("fast");
		if(func) {
			func();
		}
	}
}

function loadElement(view, element){
	$.ajax({
		url: '/yamb/layout/'+view,
		success: function(response){
			$(element).append(response);
		}
	});
}
function getJavaScript(url, func){
	$.ajax({
		url:url,
		dataType:"script",
		success: function(data, statusText){
			func(data,statusText);
		}
	});
}